﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Obvious.Framework.Notification.ConfigHandlers
{
    internal class NotificationConfigHandler
    {
        private static string _configSectionName = "obviousNotificationGroup/obviousNotificationSection";
        private static ObviousNotificationSection _configSection = null;

        internal static ObviousNotificationSection ConfigSection
        {
            get
            {
                if (_configSection == null)
                {
                    _configSection = (ObviousNotificationSection)ConfigurationManager.GetSection(NotificationConfigHandler._configSectionName);
                }
                return _configSection;
            }
        }
        internal static NotificationProviderElement GetProviderElement(string configName)
        {
            return NotificationConfigHandler.ConfigSection.NotificationProviders[configName];
        }
    }
}
